<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
<head>
    <title>Consent</title>
</head>
<body>
<h1>An application requests access to your data!</h1>
<div th:if="${param.error}">
    Invalid username and password.
</div>
<div th:if="${param.logout}">
    You have been logged out.
</div>
<form th:action="${consent}" method="post">
    <input type="hidden" name="consent_challenge" th:value="${param.consent_challenge}">
    <!--
    <p th:utext="'Hi '+ ${user} + ', application <strong>'+${client.client_name} || ${client.client_id}+'</strong> wants access resources on
    your behalf and to:'">
    </p>
    -->
    <p th:text="${requested_scope}"></p>
    <div th:each="scope : ${requested_scope}">
        <input type="checkbox" th:id="${scope}" name="grant_scope" th:value="${scope}">
        <label th:for="${scope}" th:text="${scope}"></label><br/>
    </div>
    <p>
        Do you want to be asked next time when this application wants to access your data? The application will
        not be able to ask for more permissions without your consent.
    </p>
    <p>
        <input type="checkbox" id="remember" name="remember" value="1">
        <label for="remember">Do not ask me again</label>
    </p>
    <p>
        <input type="submit" id="accept" name="submit" value="Allow access"/>
        <input type="submit" id="reject" name="submit" value="Deny access"/>
    </p>
</form>
</body>
</html>